#ifndef CAMERA_H
#define CAMERA_H

#include "common_include.h"
#include "config.h"

namespace myslam
{
	class Camera
	{
	public:
		Camera(std::string strSettingPath);
		Camera(float fx, float fy, float cx, float cy, float depth_scale) :
			fx_(fx), fy_(fy), cx_(cx), cy_(cy), depth_scale_(depth_scale) {}

		cv::Point3d world2camera(cv::Point3d p_w, cv::Mat T_c_w);
		cv::Point3d camera2world(cv::Point3d p_c, cv::Mat T_w_c);
		cv::Point2d camera2pixel(cv::Point3d p_c);
		cv::Point3d pixel2camera(cv::Point2d p_p, double depth = 1.0);
		cv::Point3d pixel2world(cv::Point2d p_p, cv::Mat T_w_c, double depth = 1.0);
		cv::Point2d world2pixel(cv::Point3d p_w, cv::Mat T_c_w);

	public:
		float fx_, fy_, cx_, cy_, depth_scale_;
	};
}
#endif